package cn.iocoder.yudao.module.system.dal.mysql.officeinfo;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.officeinfo.OfficeinfoDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.system.controller.admin.officeinfo.vo.*;

/**
 * 办公室信息 Mapper
 *
 * @author Warren365
 */
@Mapper
public interface OfficeinfoMapper extends BaseMapperX<OfficeinfoDO> {

    default PageResult<OfficeinfoDO> selectPage(OfficeinfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OfficeinfoDO>()
                .likeIfPresent(OfficeinfoDO::getOfficeName, reqVO.getOfficeName())
                .eqIfPresent(OfficeinfoDO::getOfficeAddress, reqVO.getOfficeAddress())
                .betweenIfPresent(OfficeinfoDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(OfficeinfoDO::getId));
    }
    default List<OfficeinfoDO> selectList(OfficeinfoPageReqVO reqVO) {
        return selectList(reqVO);
    }
}